﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Guru.Web.Controls.Validators
{
    public enum ValidationRule
    {
        /// <summary>
        /// Do not validate
        /// </summary>
        None,

        /// <summary>
        /// Makes the element always required.
        /// Return false if the element is empty (text input) or unchecked (radio/checkbox) or nothing selected (select). 
        /// Works with text inputs, selects, checkboxes and radio buttons. 
        /// To force a user to select an option from a select box,
        /// provide an empty options like <option value="">Choose...</option>
        /// </summary>
        Required,

        /// <summary>
        /// The validator makes the element require a given minimum length.
        /// The validator will return false, if the element is 
        ///     + some kind of text input and its value is too short 
        ///     + a set of checkboxes has not enough boxes checked 
        ///     + a select and has not enough options selected 
        /// The validator works with text inputs, selects and checkboxes.
        /// </summary>
        Minlength,

        /// <summary>
        /// The validator makes the element require a given maxmimum length.
        /// The validator return false, if the element is 
        ///     +   some kind of text input and its value is too long 
        ///     +   a set of checkboxes has too many boxes checked 
        ///     +   a select and has too many options selected 
        /// Works with text inputs, selects and checkboxes.
        /// </summary>
        Maxlength,

        /// <summary>
        /// Makes the element require a given value range.
        /// Return false, if the element is 
        ///     +   some kind of text input and its length is too short or too long 
        ///     +   a set of checkboxes has not enough or too many boxes checked 
        ///     +   a select and has not enough or too many options selected 
        /// Works with text inputs.
        /// </summary>
        Rangelength,

        /// <summary>
        /// Makes the value of element greater or equal than MinValue.
        /// Works with text inputs. 
        /// To exclude the minimum value, add Number.MIN_VALUE to that value
        /// </summary>
        GreaterOrEqualThan,

        /// <summary>
        /// Makes the value of element less or equal than MaxValue.
        /// Works with text inputs. 
        /// To exclude the maximum value, add Number.MAX_VALUE to that value
        /// </summary>
        LessOrEqualThan,

        /// <summary>
        /// Makes the element require a given value range.
        /// Works with text inputs. To exclude the maximum value, subtract Number.MIN_VALUE from that value.
        /// To exclude the minimum value, add Number.MIN_VALUE to that value
        /// </summary>
        Range,

        /// <summary>
        /// Makes the element require a valid email
        /// Return true, if the value is a valid email address. Works with text inputs.
        /// </summary>
        Email,

        /// <summary>
        /// Makes the element require a valid url
        /// Return true, if the value is a valid url. Works with text inputs.
        /// </summary>
        Url,

        /// <summary>
        /// Makes the element require a decimal number.
        /// Returns true if the value contains a valid decimal number.
        /// Works with text inputs.
        /// </summary>
        Number,

        /// <summary>
        /// Makes the element require digits only.
        /// Returns true if the value contains only digits.
        /// Works with text inputs.
        /// </summary>
        Digits,

        /// <summary>
        /// Makes the element require a certain file extension.
        /// Returns true if the value ends with one of the specified file extensions. 
        /// If nothing is specified, only images are allowed (png, jpeg, gif). 
        /// Works with text inputs.
        /// </summary>
        Accept,

        /// <summary>
        /// Makes the element require digits, letters only.
        /// </summary>
        AlphaNumeric,

        /// <summary>
        /// Makes the element require letters only.
        /// </summary>
        LettersOnly,

        /// <summary>
        /// Makes the element require do not contains white space.
        /// </summary>
        NoWhiteSpace,

        /// <summary>
        /// Makes the element require a valid integer type
        /// </summary>
        Integer,

        /// <summary>
        /// Return false if the value contains any character, which do not contain in the pattern
        /// </summary>
        StringAccept,
        
        /// <summary>
        ///  Return false if the value contains any character in the pattern
        /// </summary>
        StringUnaccept,

        /// <summary>
        /// Makes the value of element less than MaxValue
        /// </summary>
        LessThan,

        /// <summary>
        /// Makes the value of element greater than MinValue
        /// </summary>
        GreaterThan,


        ListBoxHasItem,
        RadComboValueRequired


    }

   
}
